﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// gpssync_210815数据模型对象
    /// </summary>
    [Serializable]
    public partial class gpssync_210815Mod
    {
        /// <summary>
        /// 初始化gpssync_210815数据模型对象
        /// </summary>
        public gpssync_210815Mod()
        {
            
        }
        /// <summary>
        /// 初始化gpssync_210815数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="deviceNo">DeviceNo</param>
        public gpssync_210815Mod(int iD,string deviceNo)
        {
            //给ID字段赋值
            this.ID = iD;
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
        }
        /// <summary>
        /// 初始化gpssync_210815数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="deviceNo">DeviceNo</param>
        /// <param name="upTime">UpTime</param>
        /// <param name="createTime">CreateTime</param>
        public gpssync_210815Mod(int iD,string deviceNo,DateTime? upTime,DateTime? createTime)
        {
            //给ID字段赋值
            this.ID = iD;
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
            //给UpTime字段赋值
            this.UpTime = upTime;
            //给CreateTime字段赋值
            this.CreateTime = createTime;
        }
        
		//属性存储数据的变量
        private int _iD;
        private string _deviceNo;
        private DateTime? _upTime;
        private DateTime? _createTime;
        
        /// <summary>
        /// ID
        /// </summary>
        public int ID
        {
            get { return this._iD; }
            set { this._iD = value; }
        }
        /// <summary>
        /// DeviceNo
        /// </summary>
        public string DeviceNo
        {
            get { return this._deviceNo; }
            set { this._deviceNo = value; }
        }
        /// <summary>
        /// UpTime
        /// </summary>
        public DateTime? UpTime
        {
            get { return this._upTime; }
            set { this._upTime = value; }
        }
        /// <summary>
        /// CreateTime
        /// </summary>
        public DateTime? CreateTime
        {
            get { return this._createTime; }
            set { this._createTime = value; }
        }
        
        /// <summary>
        /// 对比两个gpssync_210815数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的gpssync_210815数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成gpssync_210815数据模型对象
            gpssync_210815Mod gpssync_210815Mod = obj as gpssync_210815Mod;
            //判断是否转换成功
            if (gpssync_210815Mod == null) return false;
            //进行匹配属性的值
            return
                //判断ID是否一致
                this.ID == gpssync_210815Mod.ID &&
                //判断DeviceNo是否一致
                this.DeviceNo == gpssync_210815Mod.DeviceNo &&
                //判断UpTime是否一致
                this.UpTime == gpssync_210815Mod.UpTime &&
                //判断CreateTime是否一致
                this.CreateTime == gpssync_210815Mod.CreateTime;
        }
        /// <summary>
        /// 将当前gpssync_210815数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将gpssync_210815数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将ID进行按位异或运算处理
                this.ID.GetHashCode() ^
                //将DeviceNo进行按位异或运算处理
                (this.DeviceNo == null ? 2147483647 : this.DeviceNo.GetHashCode()) ^
                //将UpTime进行按位异或运算处理
                (this.UpTime == null ? 2147483647 : this.UpTime.GetHashCode()) ^
                //将CreateTime进行按位异或运算处理
                (this.CreateTime == null ? 2147483647 : this.CreateTime.GetHashCode());
        }
        /// <summary>
        /// 将当前gpssync_210815数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前gpssync_210815数据模型对象转换成字符串副本
            return
                "[" +
                //将ID转换成字符串
                this.ID + "," +
                //将DeviceNo转换成字符串
                this.DeviceNo +
                "]";
        }
    }
}
